package com.micro.ai.files.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 文件夹实体类
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@TableName("file_folders")
@Schema(description = "文件夹信息")
public class FileFolder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "文件夹ID", example = "folder_123456789")
    private String id;

    /**
     * 租户ID
     */
    @Schema(description = "租户ID", example = "tenant_001")
    private String tenantId;

    /**
     * 文件夹名称
     */
    @Schema(description = "文件夹名称", example = "我的文档")
    private String name;

    /**
     * 父文件夹ID，NULL表示根目录
     */
    @Schema(description = "父文件夹ID", example = "folder_parent")
    private String parentId;

    /**
     * 完整路径
     */
    @Schema(description = "完整路径", example = "/文档/我的文档")
    private String fullPath;

    /**
     * 文件夹类型：normal-普通, system-系统, shared-共享
     */
    @Schema(description = "文件夹类型", example = "normal", allowableValues = {"normal", "system", "shared"})
    private String folderType;

    /**
     * 创建人ID
     */
    @Schema(description = "创建人ID", example = "user_001")
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间", example = "2025-01-01 00:00:00")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间", example = "2025-01-01 00:00:00")
    private LocalDateTime updatedAt;

    /**
     * 删除时间
     */
    @Schema(description = "删除时间")
    private LocalDateTime deletedAt;
}

